home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-06-19 | 2.5 KB | 89 lines |
- package symantec.itools.awt;
-
-
- /**
- * This component groups the two spin buttons vertically. It is used for
- * spinners with the ORIENTATION_VERTICAL attribute set.
- * @see Spinner
- * @see Orientation
- *
- * @version 1.0, Nov 26, 1996
- *
- * @author Symantec
- *
- */
-
-
- public class VerticalSpinButtonPanel
- extends SpinButtonPanel
- {
- //--------------------------------------------------
- // constants
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // class variables
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // member variables
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // constructors
- //--------------------------------------------------
-
- /**
- * Constructs the default VerticalSpinButtonPanel.
- */
- public VerticalSpinButtonPanel()
- {
- resize(16, 22);
- }
-
-
- //--------------------------------------------------
- // accessor members
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // event methods
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // class methods
- //--------------------------------------------------
-
-
- //--------------------------------------------------
- // member methods
- //--------------------------------------------------
-
- /**
- * Moves and/or resizes this component.
- * This is a standard Java AWT method which gets called to move and/or
- * resize this component. Components that are in containers with layout
- * managers should not call this method, but rely on the layout manager
- * instead.
- *
- * This method is overridden to reshape the two direction buttons so they
- * both fit within the panel's new shape.
- *
- * @param x horizontal position in the parent's coordinate space
- * @param y vertical position in the parent's coordinate space
- * @param width the new width
- * @param height the new height
- */
- public void reshape(int x, int y, int width, int height)
- {
- incButton.reshape(0, 0, width, height / 2);
- decButton.reshape(0, height / 2 - 1, width, height / 2);
-
- super.reshape(x, y, width, height);
- }
- }